package easy;

/**
 * @Description : 回文数
 * @Author : machong
 * @Date : 2022/3/23 1:53
 * @Version : 1.0
 **/
public class leetCode09_isPalindrome {
    public boolean isPalindrome(int x) {
        if (x>=0){
            int temp = x;
            int result = 0 ;
            while (temp != 0 ){
                result = result * 10 + temp % 10 ;
                temp = temp / 10;
            }
            return x == result;
        }
            return false;
    }
}
